/**
 * Yolema.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */
package org.grayrabbit.pay.core.biz.manager.transaction;

import java.util.Date;
import org.grayrabbit.pay.core.model.entity.transaction.Trade;
import org.grayrabbit.pay.core.model.pages.PageList;
import org.grayrabbit.pay.core.model.results.GenericsResult;
import org.grayrabbit.pay.core.model.results.PayResult;

/**
 * 
 * 
 * @author liyd
 * @version $Id: TradeManager.java, v 0.1 Thu May 31 14:50:37 CST 2012 liyd Exp $
 */
public interface TradeManager {
    /**
     * 查询业务列表
     * @param trade
     * @param startDate
     * @param endDate
     * @return
     */
    public GenericsResult<PageList<Trade>> queryPageList(Trade trade, Date startDate, Date endDate);

    /**
     * 查询业务列表
     * 
     * @param trade
     * @return
     */
    public GenericsResult<PageList<Trade>> queryPageList(Trade trade);

    /**
     * 根据Id得到实体对象
     * 
     * @param id
     * @return
     */
    public GenericsResult<Trade> getById(Long id);

    /**
     * 根据id批量删除
     * 
     * @param idArray
     * @return
     */
    public PayResult deleteBatchById(Long[] idArray);

    /**
     * 添加一个对象
     * 
     * @param trade
     * @return
     */
    public GenericsResult<Trade> insert(Trade trade);

}
